#!/bin/bash
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles"
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.ustc.edu.cn/homebrew-core.git"
export HOMEBREW_API_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles/api"
export HOMEBREW_INSTALL_FROM_API=1

if [[ "$(uname -s)" == "Linux" && "$(uname -m)" == "x86_64" ]]; then
	if type dnf &>/dev/null; then
		sudo dnf -y install procps-ng curl file git
		sudo dnf -y groupinstall 'Development Tools'
	elif type apt &>/dev/null; then
		sudo apt install -y build-essential procps curl file git
	# elif type zypper &>/dev/null; then
	# 	sudo zypper install -y git git-lfs
	# elif type mamba &>/dev/null; then
	# 	mamba install git git-lfs -y
	fi
fi

bash -c "$(curl -fsSL https://mirrors.ustc.edu.cn/misc/brew-install.sh | sed '/^  wait_for_user/d')"
bash -c "$(curl -fsSL https://gitee.com/hevey88/install_script/raw/main/macos/brew_config.sh)"
# source ~/.zprofile

# /bin/bash -c "$(curl -fsSL https://gitee.com/hevey88/brew/raw/main/mac_setting.sh)" &
# /bin/bash -c "$(curl -fsSL https://gitee.com/hevey88/brew/raw/main/ohmyzsh_install.sh)"

# /bin/bash -c "$(curl -fsSL https://gitee.com/hevey88/brew/raw/main/cask_install.sh)"

# /bin/bash -c "$(curl -fsSL https://gitee.com/hevey88/brew/raw/main/mbase_install.sh)"

# /bin/bash -c "$(curl -fsSL https://gitee.com/hevey88/brew/raw/main/bigfile_install.sh)"

# open -a iTerm
# killall Terminal
# <<COMMENT
#
# /bin/bash -c "$(curl -fsSL https://gitee.com/hevey88/install_script/raw/main/macos/brew_install.sh)"
#
# COMMENT
